﻿using LiveCharts;
using LiveCharts.Wpf;
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace CustomWPFControl.ViewModel
{
    public class DataLabelTextConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var point = value as ChartPoint;
            var series = point.SeriesView as LineSeries;
            return series.Title;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
